package com.healer.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigClientController {

    @Value("${spring.application.name}")
    public String applicationName;
    @Value("${server.port}")
    public String serverPort;
    @Value("${eureka.client.service-url.defaultZone}")
    public String eurekaServer;

    @GetMapping("/getconfigclient")
    public String getConfigClient(){
        return "应用名："+applicationName+"\n"+
                "端口号："+serverPort+"\n"+
                "eureka注册中心："+eurekaServer;
    }
}
